# 序数 序数表⽰顺序位置，如 1st 和 2nd。序数⼤多以 th 结
# 尾，只有 1st、2nd、3rd 例外。
# 在⼀个列表中存储数字 1〜9。
# 遍历这个列表。
# 在循环中使⽤⼀个 if-elif-else 结构，打印每个数字对应的序
# 数。输出内容应为 "1st 2nd 3rd 4th 5th 6th 7th 8th
# 9th"，每个序数都独占⼀⾏
nums = [i for i in range(1,10)]
for i in nums:
    if i == 1:
        print('1st')
    elif i == 2:
        print('2nd')
    elif i == 3:
        print('3rd')
    else:
        print(f'{i}th')